﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="PartyVolunteerActivityRecordEdit.aspx.cs" Inherits="ZHDJ.BranchCenter.Module.PartyVolunteer.PartyVolunteerActivityRecordEdit" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title></title>
    <script src="../../../../Resource/ueditor/ueditor.config.js"></script>
    <script src="../../../../Resource/ueditor/ueditor.all.min.js"></script>
</head>
<body>
    <form id="form1" runat="server" style="background-color: #0000FF" onsubmit="return UESync();">
        <f:PageManager ID="PageManager1" AutoSizePanelID="Panel1" runat="server" />
        <f:Panel ID="Panel1" ShowBorder="false" ShowHeader="false" AutoScroll="true" runat="server" Layout="Table" BoxConfigAlign="Stretch">
            <Items>
                <f:SimpleForm ID="SimpleForm1" ShowBorder="false" ShowHeader="false" runat="server"
                    BodyPadding="10px" Title="SimpleForm">
                    <Items>
                        <f:TextBox ID="txtTitle" Required="true" ShowRedStar="true" Label="活动主题" runat="server" LabelAlign="Right" LabelWidth="100px">
                        </f:TextBox>
                        <f:DropDownList ID="ddlCategory" runat="server" Label="活动类型" LabelAlign="Right" LabelWidth="100px" Enabled="false">
                            <f:ListItem Text="在职党员进社区" Value="0" />
                            <f:ListItem Text="党员社区服务日" Value="1" />
                            <f:ListItem Text="党组织义务服务" Value="2" />
                        </f:DropDownList>
                        <f:DatePicker ID="dpBeginTime" runat="server" Label="活动开始时间" LabelAlign="Right" LabelWidth="100px" Enabled="false"></f:DatePicker>
                        <f:DatePicker ID="dpEndTime" runat="server" Label="活动结束时间" LabelAlign="Right" LabelWidth="100px" Enabled="false"></f:DatePicker>
                        <f:TextBox ID="txtAddress" runat="server" Label="活动地址" LabelAlign="Right" LabelWidth="100px" Enabled="false"></f:TextBox>
                        <f:DropDownList ID="ddlThematic" runat="server" Label="所属专题" LabelAlign="Right" LabelWidth="100px" Enabled="false">
                        </f:DropDownList>
                        <f:HyperLink runat="server" Target="_blank" CssStyle="cursor:pointer" ID="hlAttachment" LabelAlign="right" Label="附件" LabelWidth="100px">
                        </f:HyperLink>
                        <f:DropDownList ID="ddlIsShowHome" runat="server" Label="召集范围" LabelAlign="right" LabelWidth="100px" Enabled="false">
                            <f:ListItem Text="本组织（发布到本组织主页）" Value="0" />
                            <f:ListItem Text="所有组织（发布到本组织主页）和网站首页" Value="1" />
                        </f:DropDownList>
                        <f:TextBox ID="txtCreateBy" runat="server" Label="发布人" LabelAlign="right" Enabled="false" LabelWidth="100px"></f:TextBox>
                        <f:Label ID="lbContent" runat="server" LabelAlign="right" Label="召集通知" LabelWidth="100px"></f:Label>
                        <f:ContentPanel ID="ContentPanel1" runat="server" ShowBorder="false" ShowHeader="false">
                            <script type="text/plain" id="editor"></script>
                        </f:ContentPanel>
                        <f:TextBox ID="txtMembers" runat="server" Label="参与人员" LabelAlign="right" Readonly="true" LabelWidth="100px"></f:TextBox>
                        <f:RadioButtonList ID="rblOperate" runat="server" Label="操作" LabelAlign="Right" LabelWidth="100px" Width="300px" AutoPostBack="true" OnSelectedIndexChanged="rblOperate_SelectedIndexChanged">
                            <f:RadioItem Text="全选" Value="0" />
                            <f:RadioItem Text="全不选" Value="1" Selected="true" />
                            <f:RadioItem Text="反选" Value="2" />
                        </f:RadioButtonList>
                        <f:CheckBoxList runat="server" ID="cblActualMember" ColumnNumber="4" DataTextField="UserName" DataValueField="LoginID" Label="实际人员" LabelAlign="right"></f:CheckBoxList>
                        <f:FileUpload runat="server" EmptyText="请选择一张图片" ID="filePhoto"
                            Label="组动态图片" LabelWidth="100px" ButtonText="图片" ButtonIcon="ImageAdd"
                            AutoPostBack="true" LabelAlign="Right" OnFileSelected="filePhoto_FileSelected" AcceptFileTypes="image/*">
                        </f:FileUpload>
                        <f:HyperLinkImagePreview runat="server" ID="HyperLink1" CssStyle="cursor:pointer"
                            ShowEmptyLabel="true" LabelAlign="right" Text="查看图片" LabelWidth="80px">
                        </f:HyperLinkImagePreview>
                        <f:HiddenField ID="hdImageID" runat="server"></f:HiddenField>
                        <f:Label ID="lbActivityRecord" runat="server" LabelAlign="right" Label="活动记录" LabelWidth="100px"></f:Label>
                        <f:ContentPanel ID="ContentPanel2" runat="server" ShowBorder="false" ShowHeader="false">
                            <script type="text/plain" id="editor2"></script>
                        </f:ContentPanel>
                        <f:TextBox ID="txtServiceTime" runat="server" MaxLength="2" Required="true" ShowRedStar="true" Label="服务时长(小时)" LabelWidth="120px" LabelAlign="right"></f:TextBox>
                        <f:CheckBox ID="cbIsTop" runat="server" Label="文字置顶" LabelAlign="right" LabelWidth="120px"></f:CheckBox>
                    </Items>
                </f:SimpleForm>
            </Items>
            <Toolbars>
                <f:Toolbar ID="Toolbar1" runat="server" Position="Bottom" ToolbarAlign="Center">
                    <Items>
                        <f:Button ID="btnSaveClose" ValidateForms="SimpleForm1" Icon="SystemSaveClose"
                            OnClick="btnSaveClose_Click" runat="server" Text="保存并关闭">
                        </f:Button>
                        <f:ToolbarSeparator ID="ToolbarSeparator2" runat="server">
                        </f:ToolbarSeparator>
                        <f:Button ID="btnEndActivity" ValidateForms="SimpleForm1" Icon="SystemSaveClose" OnClick="btnEndActivity_Click" runat="server" Text="活动记录并结束">
                        </f:Button>
                        <f:ToolbarSeparator ID="ToolbarSeparator1" runat="server">
                        </f:ToolbarSeparator>
                        <f:Button ID="btnClose" Icon="SystemClose" EnablePostBack="false" runat="server"
                            Text="关闭" DisableControlBeforePostBack="True">
                        </f:Button>
                    </Items>
                </f:Toolbar>
            </Toolbars>
        </f:Panel>
    </form>
</body>
</html>
<script>
    var editorContent = '<%=EditorContent%>';
    var editorRecord = '<%=EditorRecord%>';

    var ue = UE.getEditor("editor", {
        initialFrameWidth: '100%',
        initialFrameHeight: '400px',
        enableAutoSave: false,
        saveInterval: 1000000,
        elementPathEnabled: false,
        autoHeightEnabled: false,
        readonly: true
    });

    var ue2 = UE.getEditor("editor2", {
        initialFrameWidth: '100%',
        initialFrameHeight: '400px',
        enableAutoSave: false,
        saveInterval: 1000000,
        elementPathEnabled: false,
        autoHeightEnabled: false,
        textarea: 'recordValue'
    });

    ue.ready(function () {
        if (editorContent) {
            ue.setContent(editorContent);
        }
    });

    ue2.ready(function () {
        if (editorRecord) {
            ue2.setContent(editorRecord);
        }
    });

    function UESync() {
        var editor = UE.getEditor('editor')
        editor.sync();

        var editor2 = UE.getEditor('editor2')
        editor2.sync();
        return true;
    }
</script>
